home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / DHTML - Window and Frames / animated-window2.izs < prev    next >
Text File  |  2005-09-02  |  4KB  |  96 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Animated Window Opener II
  4. <!/TITLE>
  5.  
  6. <!BROWSER>FF1+ IE5+<!/BROWSER>
  7.  
  8. <!DESCRIPTION>Instead of just spawning a window, this script animates it into view, by expanding it horizontally then vertically until it fills the screen. The animation is fast enough to not become tedious, and the corresponding links are easily set up.
  9. <!/DESCRIPTION> 
  10.  
  11. <!CATEGORY>window and frames<!/CATEGORY>
  12.  
  13. <!SCRIPT>
  14. <!-- START OF SCRIPT -->
  15. <!-- Step 1: Insert the below script into the HEAD section of your page: -->
  16. <SCRIPT language=JavaScript>
  17. <!-- Begin
  18.  
  19. //Animated Window- By Rizwan Chand (rizwanchand@hotmail.com)
  20. //Modified by DD for NS compatibility
  21. //Visit http://www.dynamicdrive.com for this script
  22.  
  23. function expandingWindow(website) {
  24. var windowprops='width=100,height=100,scrollbars=yes,status=yes,resizable=yes'
  25. var heightspeed = 2; // vertical scrolling speed (higher = slower)
  26. var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
  27. var leftdist = 10;    // distance to left edge of window
  28. var topdist = 10;     // distance to top edge of window
  29.  
  30. if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
  31. var winwidth = window.screen.availWidth - leftdist;
  32. var winheight = window.screen.availHeight - topdist;
  33. var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
  34. for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
  35. sizer.resizeTo("1", sizeheight);
  36. for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
  37. sizer.resizeTo(sizewidth, sizeheight);
  38. sizer.location = website;
  39. }
  40. else
  41. window.open(website,'mywindow');
  42. }
  43. //  End -->
  44. </SCRIPT>
  45. <!-- Step 2: Then, set up your corresponding links using the below HTML codes as examples: -->
  46. <!-- set up your links, either via text links or form buttons-->
  47. <a href="#" onClick="expandingWindow('http://www.yahoo.com');return false">Yahoo.com</a><br>
  48. <form>
  49. <input type="button" value="Freewarejava" onClick="expandingWindow('http://www.freewarejava.com')">
  50. </form>
  51. <!-- END OF SCRIPT -->
  52. <!/SCRIPT>
  53.  
  54. <!PREVIEW>
  55. <!-- START OF SCRIPT -->
  56. <!-- Step 1: Insert the below script into the HEAD section of your page: -->
  57. <SCRIPT language=JavaScript>
  58. <!-- Begin
  59.  
  60. //Animated Window- By Rizwan Chand (rizwanchand@hotmail.com)
  61. //Modified by DD for NS compatibility
  62. //Visit http://www.dynamicdrive.com for this script
  63.  
  64. function expandingWindow(website) {
  65. var windowprops='width=100,height=100,scrollbars=yes,status=yes,resizable=yes'
  66. var heightspeed = 2; // vertical scrolling speed (higher = slower)
  67. var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
  68. var leftdist = 10;    // distance to left edge of window
  69. var topdist = 10;     // distance to top edge of window
  70.  
  71. if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
  72. var winwidth = window.screen.availWidth - leftdist;
  73. var winheight = window.screen.availHeight - topdist;
  74. var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
  75. for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
  76. sizer.resizeTo("1", sizeheight);
  77. for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
  78. sizer.resizeTo(sizewidth, sizeheight);
  79. sizer.location = website;
  80. }
  81. else
  82. window.open(website,'mywindow');
  83. }
  84. //  End -->
  85. </SCRIPT>
  86. <!-- Step 2: Then, set up your corresponding links using the below HTML codes as examples: -->
  87. <!-- set up your links, either via text links or form buttons-->
  88. <a href="#" onClick="expandingWindow('http://www.yahoo.com');return false">Yahoo.com</a><br>
  89. <form>
  90. <input type="button" value="Freewarejava" onClick="expandingWindow('http://www.freewarejava.com')">
  91. </form>
  92.  
  93. <!-- END OF SCRIPT -->
  94. <!/PREVIEW>
  95.  
  96. <!RELATED>NONE<!/RELATED>